<template>
    <div>
        <van-nav-bar title="账户余额" left-text="返回"  left-arrow @click-left="onClickLeft" />
        <!-- right-text="余额明细" @click-right="onClickRight"-->
        <div class="top">
            <van-icon name="gold-coin" />
            <p>我的余额</p>
            <h1>￥{{myprice}}</h1>
        </div>
        <div class="box">
            <!-- <van-button  type="primary">充值</van-button> -->
            <van-button  class="tx" @click="goWithdraw">提现</van-button>
        </div>
    </div>
</template>
<script>
export default {
    data() {
        return {
            myprice:0
        }
    },
    methods:{
        onClickLeft(){
            this.$router.back()
        },
        onClickRight(){
            this.$router.push({})
        },
        goWithdraw(){
            this.$router.push({name:'withdraw'})
        }
    },created(){
        this.myprice=sessionStorage.getItem('myprice')
    }
}
</script>
<style scoped>
.top{
    height: 30rem;
    display: flex;
    flex-direction: column;
    align-items: center;
   
}
.van-icon{
    color: orange;
    font-size: 3rem;
    margin: 8rem 0 1.5rem 0 ;
}
p{
    margin-bottom: 0.5rem;
}
.box{
    height: 8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
}
.tx{
    background-color:#F2F2F2 ;
    color: #58BE6B;
}
.van-button{
    width: 8rem;
    border-radius: 0.5rem;
}
</style>
